{% extends "base.html" %}
{% block title %}
    用户文章
{% endblock %}
{% block content %}
    <a class="btn btn-default btn-lg btn-block" href="{{ url_for("note.add_note") }}">创建文章</a><br>
    <p>当前共有<strong>{{ notes|length }}</strong>篇文章</p>
{% for x in notes %}
    <br>
    <div class="panel panel-{{ style }}">
  <div class="panel-heading">{{ x.title }}</div>
  <div class="panel-body">
    {{ x.body|striptags}}
  </div>
     <ul class="list-group ">
        <li class="list-group-item center-block"><div class="text-right"><a href="{{ url_for('note.up_note',id=x.id) }}" class="btn btn-{{ style }}">编辑</a></div></li>
        <li class="list-group-item center-block"><div class="text-right"><a href="{{ url_for('note.del_note',id=x.id) }}" class="btn btn-{{ style }}">删除</a></div></li>
    </ul>
</div>
{% endfor %}
{% endblock %}